<?php

/**
52zll.top
 */

if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

$lang = array_merge($lang, $scriptlang['dzapp_zhibo']);
require_once DISCUZ_ROOT.'./source/plugin/dzapp_zhibo/setting.class.php';
MarrySetting::menu();

if(empty($_GET['ac'])) {

	if(!submitcheck('configsubmit')) {

		$dzapp_zhibo = dunserialize($_G['setting']['dzapp_zhibo']);
		showformheader('plugins&operation=config&do='.$plugin['pluginid'].'&identifier=dzapp_zhibo&pmod=admincp_config');
		showtableheader();
		showsetting('userid', 'dzapp_zhibo[userid]', $dzapp_zhibo['userid'], 'text');
		showsetting('secret', 'dzapp_zhibo[secret]', $dzapp_zhibo['secret'], 'text');
		showsetting('user_unique', 'dzapp_zhibo[user_unique]', $dzapp_zhibo['user_unique'], 'text');
		showsetting('wx_appid', 'dzapp_zhibo[wx_appid]', $dzapp_zhibo['wx_appid'], 'text');
		showsetting('wx_appsecret', 'dzapp_zhibo[wx_appsecret]', $dzapp_zhibo['wx_appsecret'], 'text');
		showsetting('wx_mchid', 'dzapp_zhibo[wx_mchid]', $dzapp_zhibo['wx_mchid'], 'text');
		showsetting('wx_key', 'dzapp_zhibo[wx_key]', $dzapp_zhibo['wx_key'], 'text');
		showsetting('manager', 'dzapp_zhibo[manager]', $dzapp_zhibo['manager'], 'text');
		showsubmit('configsubmit');
		showtablefooter();
		showformfooter();

	} else {

		C::t('common_setting')->update('dzapp_zhibo', $_GET['dzapp_zhibo']);
		updatecache('setting');

		cpmsg('do_succeed', 'action=plugins&operation=config&do='.$plugin['pluginid'].'&identifier=dzapp_zhibo&pmod=admincp_config', 'succeed');
	}
}
//From:www_caogen8_co
?>